<!DOCTYPE html>
<script>
    alert("顶部脚本")
</script>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>javascript执行的顺序</title>
    <script type="text/javascript">
        alert("头部脚本")
    </script>
</head>
<body>

</body>
<script>
    alert("底部脚本")
</script>
</html>